FIG. 8 is a main block diagram for a related art NC device. The NC device 101 includes an analytical processing section 111, an interpolating control section 112, a ladder circuit section 121, a mechanical control signal processor section 122, axis control sections 211, 221, and a spindle synchronized control section 151. The analytical processing section 111 performs analytical processes of machining work programs. Examples of the machining work programs are a positioning command like a positioning command for a contour control axis (NC axis), a command for cutting feed, or the like, a speed command for a spindle, a supplemental command for a machine control, and the like. The interpolating control section 112 receives a result of the analytical process and generates an interpolating positioning pulse or a speed command for the spindle. The generated interpolating positioning pulse or the generated speed command is transmitted to the axis control sections 211, 221 by which the spindles corresponding to the pulse or the speed command are controlled respectively. The ladder circuit section 121 performs a supplemental command control after an input supplemental command code is transmitted to the mechanical control signal processor section 122 through the interpolating control section 112. Although the NC device 101 includes a control section for controlling the NC axis such as X axis and the Z axis or the like, FIG. 8 shows only the axis control section 211 for the first spindle 314 and the axis control section 221 for the second spindle 324 for the sake of simplicity.
A spindle motor 312 drives the first spindle 314. The position and the speed of the spindle motor 312 control the position and the speed of the first spindle 314. A spindle position controller 311 controls the position and the speed of the spindle motor 312 based on the position feedback signal detected by a spindle position detector 313. A spindle motor 322 drives the second spindle 324. The position and the speed of the spindle motor 322 control the position and the speed of the second spindle 314. A spindle position controller 321 controls the position and the speed of the spindle motor 322 based on the position feedback signal detected by a spindle position detector 323.
The spindle of the related art NC device 101 is controlled so as to rotate regularly and reversely in a commanded speed based on the speed command, a regular rotation signal, and a reverse rotation signal. The speed command for the spindle is generated by the interpolating control section 112 based on an S command of a machining work program. The regular rotation signal and the reverse rotation signal for the spindle are output through the interpolating control section 112, the ladder circuit section 121, and the mechanical control signal processing section 122 based on M3 and M4 command of the machining work program.
A c-axis selection signal 123 for the spindle output to the mechanical control signal processing section 122 switches the spindle to a NC axis performing positioning, cutting feed or the like based on the positioning command. The c-axis selection signal 123 is generated, for example, by a M18 command of the machining work program. The NC axis of the spindle performs contour controls while cooperating with NC axes (x axis, z axis, or the like) driving a turning tool stage or the like. In a case where controlling the position of the first spindle 314 as a NC axis (referred to as a c-axis controlling position control mode), the spindle c-axis control switching section 212 for the first spindle 314 switches the axis control from the spindle control section 213, which controls the spindle based on the speed command, to the NC axis control section 214, which controls the NC axis based on the interpolating positioning pulse output from the interpolating control section 112 by outputting the c-axis selection signal 123 corresponding to the first spindle 314.
Following above described switching, a mode of the spindle position control section 311 is switched from the spindle control mode, in which the spindle position control section 311 controls speed, to the c-axis controlling position control mode, in which the spindle position control section 311 controls position by a position loop gain specialized for c-axis control. After the switching, the interpolating positioning pulse for each NC axis is generated so that commanded positions of one or a plurality of NC axes interpolatingly moves in relation to the position command and the feeding speed command commanded by the machining work program. The interpolating positioning pulse output to the NC axis corresponding to the first spindle 314 is processed in the NC axis control section 214 by acceleration and deceleration process or the like. The NC axis control section 214 outputs a positioning command corresponding to the spindle positioning control section 311 so as to control the position. The above described control enables a c-axis machining work such as drilling or milling on a side surface (peripheral surface) of a work with a rotational tool.
A NC axis synchronizing control section 113 controls the NC axis synchronously with another NC axis by synchronously outputting the interpolating positioning pulse for the NC axis based on the positioning command commanded by the machining work program to another NC axis. For example, in a case where the position of the first spindle 314 is controlled as a c1-axis and the position of the second spindle 324 is controlled as a c2-axis after switching to the c-axis controlling position control mode, when positioning the c1-axis and the c2-axis at given positions respectively and controlling the c2-axis synchronously with the c1-axis, the c2-axis moves synchronously with the c1-axis in a same amount as the c1-axis moves. The NC work machine provided with the first spindle 314 and the second spindle 324 which are arranged oppositely enables to perform machining work (drilling, milling or the like) on the side surface of a single work while positioning the work at a given angle in a state where the first spindle 314 and the second spindle 324 both grasp the work because of the NC axis synchronized control for the c2-axis. In the synchronized control, the c2-axis synchronize the positioning command for the c1-axis so as to rotate in a same direction as the c1-axis rotates by assigning NC axis sync-polarity reversely after positioning the c1-axis and the c2-axis at the given angle and both grasp the single work.
In a case where the spindle control mode where the speed of the spindle is controlled by rotating the spindle by the speed command is selected instead of controlling the position of the spindle as a NC axis (a axis performing positioning, cutting feed, or the like based on the positioning command), when the spindle synchronized control command is commanded by the machining work program or the like, the control mode is switched to the spindle synchronous control positioning control mode where the positions of a master spindle (a reference spindle) and a slave spindle (synchronized spindle) are controlled by a position loop gain specialized for the spindle synchronous control. The reference spindle is a reference of the synchronous control and the synchronized spindle moves synchronously with the reference spindle. In the spindle synchronous control positioning control mode, the position of the reference axis is controlled based on a spindle synchronizing positioning command which is generated by integrating a given speed command.
The synchronized spindle rotates in a synchronized speed since the spindle synchronized control section 151 controls the synchronized spindle so as to synchronize with the reference spindle in terms of rotation by outputting the spindle synchronizing positioning command for the reference spindle to the synchronized spindle. Accordingly, the NC work machine provided with the first spindle 314 and the second spindle 324 which are arranged oppositely enables to do cutting works while grasping a single work from both sides.
When a phase matching command is also commanded in the spindle synchronizing control command, a phase matching is performed at the spindle side so that the phase difference between the spindles is a given angle. Therefore, the NC work machine provided with the first spindle 314 and the second spindle 324 which are arranged oppositely enables to pass a work from the first spindle 314 to the second spindle 324 while each spindle rotates.
In the above described related art NC device 101, since the spindle is in selected one of the spindle control mode where the spindle is subjected to the speed command and the c-axis controlling positioning control mode where the position of the spindle is controlled as a contour control axis (NC axis), it is necessary to switch the control of the first spindle 314 and the second spindle 324 to the spindle synchronizing control by outputting the spindle synchronizing control command after selecting the spindle control mode in advance in a case where the NC work machine provided with the first spindle 314 and the second spindle 324 which are arranged oppositely performs cutting works on a single work while the first spindle 314 and the second spindle 324 synchronously rotating in a commanded speed and grasp the work with the two spindles.
Also, since the spindle is in selected one of the spindle control mode where the spindle is subjected to the speed command and the c-axis controlling positioning control mode where the position of the spindle is controlled as a contour control axis (NC axis), it is necessary to switch the control of the first spindle 314 and the second spindle 324 to the NC axis synchronizing control by outputting the NC axis synchronizing control command after the first spindle 314 and the second spindle 324 grasp the work at a given angle in the c-axis controlling positioning control mode selected in advance in a case where the NC work machine provided with the first spindle 314 and the second spindle 324 which are arranged oppositely performs c-axis working such as drilling machining work, milling work, or the like on the side surface (peripheral surface) of the work with rotational tools while synchronously positioning the first spindle 314 and the second spindle 324 at a given angle.
In order to switch the spindle synchronizing control where the synchronous control is performed by the speed command and the NC axis synchronizing control where the synchronous control is performed by the positioning command, it is necessary to switch the mode of the respective spindles to the spindle control mode or c-axis controlling positioning control mode in advance. Therefore, when switching from the spindle synchronizing control to the c-axis synchronizing control the spindle synchronizing control must be canceled. Also, when switching from the c-axis synchronizing control to the spindle synchronizing control the c-axis synchronizing control must be canceled.
When performing the synchronizing control with grasping a single work from both sides by opposing two spindles, if the positioning control gains for both spindles are different, a difference in the theoretical positioning deviation of each spindle arises depending on the speed. Therefore, a torque arises as a result of interporating movement of each spindle of the positioning control and there is a problem that the work is twisted. Because of the problem, it is impossible for the reference spindle and the synchronized spindle under the spindle synchronizing control to switch the control of the spindles to another positioning control. (For example, switching the reference spindle only from the spindle control mode to the c-axis controlling positioning control mode where the positioning control gain is different from that of the spindle control mode). Since it is necessary to cancel the synchronizing control in order to switch the spindle synchronizing control where the synchronizing control is performed by the speed command and the NC axis synchronizing control where the synchronizing control is performed by the positioning command, the synchronization between the two spindles can not be kept. Therefore, the cutting machining works and the machining works by rotational tools (c-axis machining work such as drilling, milling or the like) can not be performed consecutively while grasping the work from both sides by chuck.
In order to perform a secondary machining work on the surface of the work worked by the first spindle 314 after passing the work from the first spindle 314 to the second spindle 324, it is necessary to pass the work after positioning or phase matching for both spindles in advance so as to match the positioning origin of the first spindle 314 and the second spindle 324. Thus, the phase matching takes an operation time.
As a related art NC device addressing a part of the above described problems are proposed (For example, Patent Documents 1, 2). The proposed NC device controls one spindle by the c-axis control so as to back to the c-axis origin by resetting the rotational angle positioning data of the spindle while making the other spindle freely rotatable following the spindle.
Also another proposed NC device determines the angle for the phase matching of the spindle synchronizing control by phase difference calculation so that the chuck position is adjusted to the shape of the deformed work when the NC device grasp the deformed work with the both spindles. Thus the proposed NC device reduces the time cost for the phase matching of the spindle synchronizing control for each machining work cycle (for example Patent Document 3).